const user = {
  state: {
    userInfo: null,
    authorization: null
  },
  mutations: {
    UPDATE_USERINFO(state, userInfo) {
      state.userInfo = state.userInfo == null ? userInfo : Object.assign(state.userInfo, userInfo);
    },
    UPDATE_AUTHORIZATION(state, data) {
      state.authorization = data;
    }
  }
};

export default user;
